package com.gitee.tanmingjian.httptunnel.core.bean;

import java.util.List;
import java.util.Objects;

public class ResultSetData {

    private List<FieldHeader> fieldHeaders;

    private List<List<String>> data;

    public ResultSetData(List<FieldHeader> fieldHeaders, List<List<String>> data) {
        this.fieldHeaders = fieldHeaders;
        this.data = data;
    }

    public List<FieldHeader> getFieldHeaders() {
        return fieldHeaders;
    }

    public void setFieldHeaders(List<FieldHeader> fieldHeaders) {
        this.fieldHeaders = fieldHeaders;
    }

    public List<List<String>> getData() {
        return data;
    }

    public void setData(List<List<String>> data) {
        this.data = data;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ResultSetData that = (ResultSetData) o;
        return Objects.equals(fieldHeaders, that.fieldHeaders) && Objects.equals(data, that.data);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fieldHeaders, data);
    }

    @Override
    public String toString() {
        return "ResultSetData{" +
                "fieldHeaders=" + fieldHeaders +
                ", data=" + data +
                '}';
    }
}
